<html>
<head><meta charset="utf-8"><title>TypeVisitor: use ops::ControlFlow instead… compiler-team#374 · t-compiler/major changes · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/index.html">t-compiler/major changes</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html">TypeVisitor: use ops::ControlFlow instead… compiler-team#374</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213916879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213916879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213916879">(Oct 20 2020 at 13:18)</a>:</h4>
<p>A new proposal has been announced: <a href="https://github.com/rust-lang/compiler-team/issues/374">TypeVisitor: use ops::ControlFlow instead of bool #374</a>. It will be announced at the next meeting to try and draw attention to it, but usually MCPs are not discussed during triage meetings. If you think this would benefit from discussion amongst the team, consider proposing a design meeting.</p>



<a name="213917449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213917449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213917449">(Oct 20 2020 at 13:21)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="492">@T-compiler</span>: Proposal <a href="https://github.com/rust-lang/compiler-team/issues/374#issuecomment-712845467">#374</a> has been seconded, and will be approved in 10 days if no objections are raised.</p>



<a name="213917549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213917549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213917549">(Oct 20 2020 at 13:22)</a>:</h4>
<p>Seems reasonable, I get confused about what the bool means all the time</p>



<a name="213917601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213917601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213917601">(Oct 20 2020 at 13:22)</a>:</h4>
<p>yea, I'm all for using an explicit enum</p>



<a name="213917689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213917689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213917689">(Oct 20 2020 at 13:23)</a>:</h4>
<p>The only change that we could do is create ZSTs other than <code>()</code> that convey their meaning via their name</p>



<a name="213917739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213917739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213917739">(Oct 20 2020 at 13:23)</a>:</h4>
<p>like not even associated types, but just two global Zsts that we'd use</p>



<a name="213917757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213917757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213917757">(Oct 20 2020 at 13:23)</a>:</h4>
<p>what do you mean here?</p>



<a name="213917834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213917834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213917834">(Oct 20 2020 at 13:24)</a>:</h4>
<p>rn we can use both <code>ControlFlow::BREAK</code> and <code>ControlFlow::CONTINUE</code></p>



<a name="213917922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213917922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213917922">(Oct 20 2020 at 13:24)</a>:</h4>
<p><span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span> yea, don't mind me... I forgot the <code>()</code> are just extra data</p>



<a name="213918210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213918210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213918210">(Oct 20 2020 at 13:26)</a>:</h4>
<p>a bit unrelated, but for <a href="https://github.com/rust-lang/rust/issues/77307">#77307</a> it would be nice to exit the <code>mir::Visitor</code> early, is there a reason we do not allow early exits there?</p>



<a name="213918392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213918392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213918392">(Oct 20 2020 at 13:28)</a>:</h4>
<p>visitors generally visit everything. I've had this problem before, too. One way would be to make the return value of the visitor a <code>Result</code> with an associated error type</p>



<a name="213918451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213918451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213918451">(Oct 20 2020 at 13:28)</a>:</h4>
<p>I would have opened an MCP for also using <code>ops::ControlFlow</code> there</p>



<a name="213918520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213918520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213918520">(Oct 20 2020 at 13:29)</a>:</h4>
<p>if you think that this is sensible</p>



<a name="213918779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213918779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213918779">(Oct 20 2020 at 13:31)</a>:</h4>
<p>that is reasonable, I think we could actually make quite a few existing visitors simpler this way</p>



<a name="213918879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213918879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213918879">(Oct 20 2020 at 13:32)</a>:</h4>
<p>while having a non-error value to be bubbled up is hard because then you need to combine it and stuff, just the <code>Break</code> value can trivially get bubbled up</p>



<a name="213950742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213950742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213950742">(Oct 20 2020 at 17:17)</a>:</h4>
<p>So, just for reference, one of the things we've been talking about in wg-traits is adopting the Chalk model for Visitor to rustc</p>



<a name="213950842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213950842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213950842">(Oct 20 2020 at 17:18)</a>:</h4>
<p>Interesting, the Visitor in Chalk can have any type of <code>VisitResult</code></p>



<a name="213950885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213950885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213950885">(Oct 20 2020 at 17:18)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/blob/8f88cdf677552115ed40e853a3ff422f4d55ff21/chalk-ir/src/visit.rs#L19"><code>VisitResult</code></a></p>



<a name="213951111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213951111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213951111">(Oct 20 2020 at 17:20)</a>:</h4>
<p>Using this, there are different types of results, like <code>FindAny</code> or <code>ReturnEarly</code></p>



<a name="213977116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213977116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213977116">(Oct 20 2020 at 20:45)</a>:</h4>
<p><span class="user-mention" data-user-id="216206">@lcnr</span> Do you plan to do the refractor? Do you want me to do it?</p>



<a name="213977362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213977362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213977362">(Oct 20 2020 at 20:47)</a>:</h4>
<p>hmm, if you are interested in working on this go ahead <span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span> at least this isn't something we might end up having to discard :)</p>



<a name="213999300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213999300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213999300">(Oct 21 2020 at 01:31)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/76614">https://github.com/rust-lang/rust/pull/76614</a> is open to swap the type arguments so that the future "In the future we may change the used type to <code>std::ops::ControlFlow&lt;(), Self::BreakTy&gt;</code>" would be <code>ControlFlow&lt;Self::BreakTy&gt;</code> instead.</p>
<p><span class="user-mention" data-user-id="337175">@Leonora Tindall</span> Any status update on that PR?  It would be nice to get that in before a whole bunch new usage sites show up...</p>
<p>(Though I guess if this MCP would only use <code>ControlFlow&lt;(), ()&gt;</code> (the control flow Owl) changing the order wouldn't matter.)</p>



<a name="213999744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213999744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213999744">(Oct 21 2020 at 01:40)</a>:</h4>
<p>Aside: there were some conversations (<a href="https://github.com/rust-lang/rust/pull/76318#discussion_r483467298">pr thread</a>, <a href="#narrow/stream/219381-t-libs/topic/Simplifying.20continue-with-unit.20in.20.60ControlFlow.60/near/209151522">zulip link</a>) about whether <code>ControlFlow::BREAK</code> and <code>ControlFlow::CONTINUE</code> were the best way of exposing the <code>()</code> versions.  If anyone as part of using this develops opinions about that (<span class="user-mention" data-user-id="216206">@lcnr</span>?), please let the tracking issue know (<a href="https://github.com/rust-lang/rust/issues/75744">#75744</a>).</p>



<a name="213999783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/213999783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#213999783">(Oct 21 2020 at 01:42)</a>:</h4>
<p>(In the compiler you can even use <code>try{}</code> instead of <code>ControlFlow::Continue(())</code>...)</p>



<a name="214044822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/214044822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#214044822">(Oct 21 2020 at 12:52)</a>:</h4>
<p>I opened <a href="https://github.com/rust-lang/rust/issues/78182">#78182</a> to implement the MCP.</p>



<a name="214044990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/214044990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#214044990">(Oct 21 2020 at 12:53)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125270">scottmcm</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374/near/213999300">said</a>:</p>
<blockquote>
<p><a href="https://github.com/rust-lang/rust/pull/76614">https://github.com/rust-lang/rust/pull/76614</a> is open to swap the type arguments so that the future "In the future we may change the used type to <code>std::ops::ControlFlow&lt;(), Self::BreakTy&gt;</code>" would be <code>ControlFlow&lt;Self::BreakTy&gt;</code> instead.</p>
<p><span class="user-mention silent" data-user-id="337175">Leonora Tindall</span> Any status update on that PR?  It would be nice to get that in before a whole bunch new usage sites show up...</p>
<p>(Though I guess if this MCP would only use <code>ControlFlow&lt;(), ()&gt;</code> (the control flow Owl) changing the order wouldn't matter.)</p>
</blockquote>
<p>Also a simple find and replace should be enough to change <code>ControlFlow&lt;(), ()&gt;</code> to <code>ControlFlow&lt;()&gt;</code></p>



<a name="215130130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20use%20ops%3A%3AControlFlow%20instead%E2%80%A6%20compiler-team%23374/near/215130130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20use.20ops.3A.3AControlFlow.20instead.E2.80.A6.20compiler-team.23374.html#215130130">(Oct 30 2020 at 18:02)</a>:</h4>
<p>This proposal has been accepted: <a href="https://github.com/rust-lang/compiler-team/issues/374">#374</a>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>